$().ready(function() {	
	// validate contact form on keyup and submit
	$("#form_contact").validate({
		rules: {
			name: "required",
			comp_name: "required",
			phone: {
				required: true,
				minlength: 7,
				number: true
			},
			email: {
				required: true,
				email: true
			},
			subject: {
				required: true,
				minlength: 5
			},
			text: {
				required: true,
				minlength: 5
			}
		},
		messages: {
			name: "Please enter your Name.",
			comp_name: "Please enter your Company Name.",
			phone: {
				required: "Please provide your Tel. no. or Cell no.  and must be all Numeric.",
				minlength: "Your Tel. no. or Cell no. consist at least 7 digits or maximum 16 digits."
			},
			subject: {
				required: "Please enter your Subject.",
				minlength: "Your Subject must consist of at least 5 characters."
			},
			email: "Please enter a valid email address.",
			text: {
				required: "Please provide your Message.",
				minlength: "Your Message must be at least 5 characters long."
			}
		}
	});
});
